package mest.service.Modeling.Impl;

import mest.dao.Modeling.IsaveTypeDao;
import mest.entity.save_type;
import mest.service.Modeling.IsaveTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description
 * @auther Machenike
 * @create 2019-11-16 0:36
 */
@Service
public class SaveTypeServiceImpl implements IsaveTypeService {

    @Resource
    private IsaveTypeDao istd;

    @Override
    public int insertsaveType(save_type st) {
        try {
            return istd.insertsaveType(st);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return 0;
    }

    @Override
    public int selectCount() {
        return istd.selectCount();
    }

    @Override
    public List<save_type> findSaveTypePage(int index, int pageSize) {
        return istd.findSaveTypePage((index-1)*pageSize,pageSize);
    }
}
